package cn.ilikes.tools.nosql.test.jpa.pojos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_employee_group", schema = "ilikes")
public class EmployeeGroup {

	@Id
	@Column(name = "id")
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;

	@Column(name = "group_name")
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "groupName", store = IndexColumn.Store.yes)
	private String groupName;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cycles_id")
	@IndexColumn
	private Cycles cycles;

	//	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employeeGroup")
	//	private List<EmployeeMember> EmployeeMembers;
	//
	//	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employeeGroup")
	//	private List<EmployeeGroupPlanMap> employeeGroupPlanMap;

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	//	public List<EmployeeGroupPlanMap> getEmployeeGroupPlanMap() {
	//		return employeeGroupPlanMap;
	//	}
	//
	//	public void setEmployeeGroupPlanMap(List<EmployeeGroupPlanMap> employeeGroupPlanMap) {
	//		this.employeeGroupPlanMap = employeeGroupPlanMap;
	//	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	//	public List<EmployeeMember> getEmployeeMembers() {
	//		return EmployeeMembers;
	//	}
	//
	//	public void setEmployeeMembers(List<EmployeeMember> employeeMembers) {
	//		EmployeeMembers = employeeMembers;
	//	}

	public Cycles getCycles() {
		return cycles;
	}

	public void setCycles(Cycles cycles) {
		this.cycles = cycles;
	}

}